package com.ym.b2b.buyer.dao.impl;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.ym.b2b.buyer.dao.EmCBuyerAddressDao;
import com.ym.b2b.buyer.sqlbean.EmCBuyerAddress;
import com.ym.b2b.commons.dao.BaseDao;

@Repository
public class EmCBuyerAddressDaoImpl<T> extends BaseDao<T> implements EmCBuyerAddressDao {

    @Override
    public EmCBuyerAddress searchEmCBuyerAddressDetail(EmCBuyerAddress emCBuyerAddress) throws DataAccessException {

        return (EmCBuyerAddress) find("EmCBuyerAddress.searchEmCBuyerAddress", emCBuyerAddress);
    }

    @Override
    public List<EmCBuyerAddress> searchEmCBuyerAddress(EmCBuyerAddress emCBuyerAddress) throws DataAccessException {
        return list("EmCBuyerAddress.searchEmCBuyerAddress", emCBuyerAddress);
    }

    @Override
    public void insertEmCBuyerAddress(EmCBuyerAddress emCBuyerAddress) throws DataAccessException {
        insert("EmCBuyerAddress.insertEmCBuyerAddress", emCBuyerAddress);

    }

    @Override
    public void updateEmCBuyerAddress(EmCBuyerAddress emCBuyerAddress) throws DataAccessException {
        update("EmCBuyerAddress.updateEmCBuyerAddress", emCBuyerAddress);
    }

    @Override
    public void updateEmCBuyerAddressByBuyerCode(EmCBuyerAddress emCBuyerAddress) throws DataAccessException {
        update("EmCBuyerAddress.updateEmCBuyerAddressByBuyerCode", emCBuyerAddress);
    }

    @Override
    public void deleteEmCBuyerAddress(EmCBuyerAddress emCBuyerAddress) throws DataAccessException {
        delete("EmCBuyerAddress.deleteEmCBuyerAddress", emCBuyerAddress);
    }
}
